<!DOCTYPE html><html><head><title>Ext.data.Operation | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
<style type="text/css">.head-band { display: none; }
.header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
.doc-tab .members .member a.more { background-color: #efefef; }
</style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
</head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
<a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">

    req = {
        liveURL: '.',
        standAloneMode: true,
        origDocClass: 'Ext.data.Operation',
        docClass: 'Ext.data.Operation',
        docReq: 'Ext.data.Operation',
        version: '4.0',
        baseURL: '.',
        baseDocURL: '.',
        baseProdURL: '.'
    };

    clsInfo = {};



</script>

<script type="text/javascript" src="../search.js"></script>
<!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
<script type="text/javascript" src="../class_tree.js"></script>
<script type="text/javascript" src="../class_doc.js"></script>
<script type="text/javascript">
    req.source = 'Operation.html#Ext-data.Operation';
    clsInfo = {"methods":["Operation","allowWrite","getError","getRecords","getResultSet","hasException","isComplete","isRunning","isStarted","setCompleted","setException","setStarted","setSuccessful","wasSuccessful"],"cfgs":["action","batch","filters","group","limit","sorters","start","synchronous"],"properties":[],"events":[],"subclasses":[]};
    Ext.onReady(function() {
        Ext.create('Docs.classPanel');
    });
</script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/Operation.html#Ext-data.Operation" target="_blank">Ext.data.Operation</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><p>Represents a single read or write operation performed by a <a href="Ext.data.proxy.Proxy.html" rel="Ext.data.proxy.Proxy" class="docClass">Proxy</a>.
Operation objects are used to enable communication between Stores and Proxies. Application
developers should rarely need to interact with Operation objects directly.</p>




<p>Several Operations can be batched together in a <a href="Ext.data.Batch.html" rel="Ext.data.Batch" class="docClass">batch</a>.</p>

<div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">Other Configs</h4><div id="config-action" class="member f ni"><a href="Ext.data.Operation.html#config-action" rel="config-action" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-action" class="viewSource">view source</a></div><a name="action"></a><a name="config-action"></a><a href="Ext.data.Operation.html#" rel="config-action" class="cls expand">action</a><span> : String</span></div><div class="description"><div class="short"><p>The action being performed by this Operation. Should be one of 'create', 'read', 'update' or 'destroy'</p>
</div><div class="long"><p>The action being performed by this Operation. Should be one of 'create', 'read', 'update' or 'destroy'</p>
</div></div></div><div id="config-batch" class="member ni"><a href="Ext.data.Operation.html#config-batch" rel="config-batch" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-batch" class="viewSource">view source</a></div><a name="batch"></a><a name="config-batch"></a><a href="Ext.data.Operation.html#" rel="config-batch" class="cls expand">batch</a><span> : Ext.data.Batch</span></div><div class="description"><div class="short"><p>The batch that this Operation is a part of (optional)</p>
</div><div class="long"><p>The batch that this Operation is a part of (optional)</p>
</div></div></div><div id="config-filters" class="member ni"><a href="Ext.data.Operation.html#config-filters" rel="config-filters" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-filters" class="viewSource">view source</a></div><a name="filters"></a><a name="config-filters"></a><a href="Ext.data.Operation.html#" rel="config-filters" class="cls expand">filters</a><span> : Array</span></div><div class="description"><div class="short"><p>Optional array of filter objects. Only applies to 'read' actions.</p>
</div><div class="long"><p>Optional array of filter objects. Only applies to 'read' actions.</p>
</div></div></div><div id="config-group" class="member ni"><a href="Ext.data.Operation.html#config-group" rel="config-group" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-group" class="viewSource">view source</a></div><a name="group"></a><a name="config-group"></a><a href="Ext.data.Operation.html#" rel="config-group" class="cls expand">group</a><span> : Object</span></div><div class="description"><div class="short"><p>Optional grouping configuration. Only applies to 'read' actions where grouping is desired.</p>
</div><div class="long"><p>Optional grouping configuration. Only applies to 'read' actions where grouping is desired.</p>
</div></div></div><div id="config-limit" class="member ni"><a href="Ext.data.Operation.html#config-limit" rel="config-limit" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-limit" class="viewSource">view source</a></div><a name="limit"></a><a name="config-limit"></a><a href="Ext.data.Operation.html#" rel="config-limit" class="cls expand">limit</a><span> : Number</span></div><div class="description"><div class="short"><p>The number of records to load. Used on 'read' actions when paging is being used.</p>
</div><div class="long"><p>The number of records to load. Used on 'read' actions when paging is being used.</p>
</div></div></div><div id="config-sorters" class="member ni"><a href="Ext.data.Operation.html#config-sorters" rel="config-sorters" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-sorters" class="viewSource">view source</a></div><a name="sorters"></a><a name="config-sorters"></a><a href="Ext.data.Operation.html#" rel="config-sorters" class="cls expand">sorters</a><span> : Array</span></div><div class="description"><div class="short"><p>Optional array of sorter objects. Only applies to 'read' actions.</p>
</div><div class="long"><p>Optional array of sorter objects. Only applies to 'read' actions.</p>
</div></div></div><div id="config-start" class="member ni"><a href="Ext.data.Operation.html#config-start" rel="config-start" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-start" class="viewSource">view source</a></div><a name="start"></a><a name="config-start"></a><a href="Ext.data.Operation.html#" rel="config-start" class="cls expand">start</a><span> : Number</span></div><div class="description"><div class="short"><p>The start index (offset), used in paging when running a 'read' action.</p>
</div><div class="long"><p>The start index (offset), used in paging when running a 'read' action.</p>
</div></div></div><div id="config-synchronous" class="member ni"><a href="Ext.data.Operation.html#config-synchronous" rel="config-synchronous" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-cfg-synchronous" class="viewSource">view source</a></div><a name="synchronous"></a><a name="config-synchronous"></a><a href="Ext.data.Operation.html#" rel="config-synchronous" class="cls expand">synchronous</a><span> : Boolean</span></div><div class="description"><div class="short">True if this Operation is to be executed synchronously (defaults to true). This
property is inspected by a Batch to s...</div><div class="long"><p>True if this Operation is to be executed synchronously (defaults to true). This
property is inspected by a <a href="Ext.data.Batch.html" rel="Ext.data.Batch" class="docClass">Batch</a> to see if a series of Operations can be executed in
parallel or not.</p>
</div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-Operation" class="member f ni"><a href="Ext.data.Operation.html#method-Operation" rel="method-Operation" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-constructor" class="viewSource">view source</a></div><a name="Operation"></a><a name="method-Operation"></a><a href="Ext.data.Operation.html#" rel="method-Operation" class="cls expand">Operation</a>(
<span class="pre">Object config</span>)
 : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
<h3 class="pa">Parameters</h3><ul><li><span class="pre">config</span> : Object<div class="sub-desc"><p>Optional config object</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-allowWrite" class="member ni"><a href="Ext.data.Operation.html#method-allowWrite" rel="method-allowWrite" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-allowWrite" class="viewSource">view source</a></div><a name="allowWrite"></a><a name="method-allowWrite"></a><a href="Ext.data.Operation.html#" rel="method-allowWrite" class="cls expand">allowWrite</a> : Boolean</div><div class="description"><div class="short"><p>Checks whether this operation should cause writing to occur.</p>
</div><div class="long"><p>Checks whether this operation should cause writing to occur.</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>Whether the operation should cause a write to occur.</p>
</li></ul></div></div></div><div id="method-getError" class="member ni"><a href="Ext.data.Operation.html#method-getError" rel="method-getError" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-getError" class="viewSource">view source</a></div><a name="getError"></a><a name="method-getError"></a><a href="Ext.data.Operation.html#" rel="method-getError" class="cls expand">getError</a> : Mixed</div><div class="description"><div class="short"><p>Returns the error string or object that was set using <a href="Ext.data.Operation.html#setException" rel="Ext.data.Operation#setException" class="docClass">setException</a></p>
</div><div class="long"><p>Returns the error string or object that was set using <a href="Ext.data.Operation.html#setException" rel="Ext.data.Operation#setException" class="docClass">setException</a></p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Mixed</span>&nbsp; &nbsp;<p>The error object</p>
</li></ul></div></div></div><div id="method-getRecords" class="member ni"><a href="Ext.data.Operation.html#method-getRecords" rel="method-getRecords" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-getRecords" class="viewSource">view source</a></div><a name="getRecords"></a><a name="method-getRecords"></a><a href="Ext.data.Operation.html#" rel="method-getRecords" class="cls expand">getRecords</a> : Array</div><div class="description"><div class="short"><p>Returns an array of <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> instances as set by the Proxy.</p>
</div><div class="long"><p>Returns an array of <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> instances as set by the Proxy.</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>Any loaded Records</p>
</li></ul></div></div></div><div id="method-getResultSet" class="member ni"><a href="Ext.data.Operation.html#method-getResultSet" rel="method-getResultSet" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-getResultSet" class="viewSource">view source</a></div><a name="getResultSet"></a><a name="method-getResultSet"></a><a href="Ext.data.Operation.html#" rel="method-getResultSet" class="cls expand">getResultSet</a> : Ext.data.ResultSet</div><div class="description"><div class="short">Returns the ResultSet object (if set by the Proxy). This object will contain the model instances
as well as meta data...</div><div class="long"><p>Returns the ResultSet object (if set by the Proxy). This object will contain the <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">model</a> instances
as well as meta data such as number of instances fetched, number available etc</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.ResultSet</span>&nbsp; &nbsp;<p>The ResultSet object</p>
</li></ul></div></div></div><div id="method-hasException" class="member ni"><a href="Ext.data.Operation.html#method-hasException" rel="method-hasException" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-hasException" class="viewSource">view source</a></div><a name="hasException"></a><a name="method-hasException"></a><a href="Ext.data.Operation.html#" rel="method-hasException" class="cls expand">hasException</a> : Boolean</div><div class="description"><div class="short"><p>Returns true if this Operation encountered an exception (see also <a href="Ext.data.Operation.html#getError" rel="Ext.data.Operation#getError" class="docClass">getError</a>)</p>
</div><div class="long"><p>Returns true if this Operation encountered an exception (see also <a href="Ext.data.Operation.html#getError" rel="Ext.data.Operation#getError" class="docClass">getError</a>)</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if there was an exception</p>
</li></ul></div></div></div><div id="method-isComplete" class="member ni"><a href="Ext.data.Operation.html#method-isComplete" rel="method-isComplete" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-isComplete" class="viewSource">view source</a></div><a name="isComplete"></a><a name="method-isComplete"></a><a href="Ext.data.Operation.html#" rel="method-isComplete" class="cls expand">isComplete</a> : Boolean</div><div class="description"><div class="short"><p>Returns true if the Operation has been completed</p>
</div><div class="long"><p>Returns true if the Operation has been completed</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the Operation is complete</p>
</li></ul></div></div></div><div id="method-isRunning" class="member ni"><a href="Ext.data.Operation.html#method-isRunning" rel="method-isRunning" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-isRunning" class="viewSource">view source</a></div><a name="isRunning"></a><a name="method-isRunning"></a><a href="Ext.data.Operation.html#" rel="method-isRunning" class="cls expand">isRunning</a> : Boolean</div><div class="description"><div class="short"><p>Returns true if the Operation has been started but has not yet completed.</p>
</div><div class="long"><p>Returns true if the Operation has been started but has not yet completed.</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the Operation is currently running</p>
</li></ul></div></div></div><div id="method-isStarted" class="member ni"><a href="Ext.data.Operation.html#method-isStarted" rel="method-isStarted" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-isStarted" class="viewSource">view source</a></div><a name="isStarted"></a><a name="method-isStarted"></a><a href="Ext.data.Operation.html#" rel="method-isStarted" class="cls expand">isStarted</a> : Boolean</div><div class="description"><div class="short">Returns true if the Operation has been started. Note that the Operation may have started AND completed,
see isRunning...</div><div class="long"><p>Returns true if the Operation has been started. Note that the Operation may have started AND completed,
see <a href="Ext.data.Operation.html#isRunning" rel="Ext.data.Operation#isRunning" class="docClass">isRunning</a> to test if the Operation is currently running.</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the Operation has started</p>
</li></ul></div></div></div><div id="method-setCompleted" class="member ni"><a href="Ext.data.Operation.html#method-setCompleted" rel="method-setCompleted" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-setCompleted" class="viewSource">view source</a></div><a name="setCompleted"></a><a name="method-setCompleted"></a><a href="Ext.data.Operation.html#" rel="method-setCompleted" class="cls expand">setCompleted</a> : void</div><div class="description"><div class="short"><p>Marks the Operation as completed</p>
</div><div class="long"><p>Marks the Operation as completed</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-setException" class="member ni"><a href="Ext.data.Operation.html#method-setException" rel="method-setException" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-setException" class="viewSource">view source</a></div><a name="setException"></a><a name="method-setException"></a><a href="Ext.data.Operation.html#" rel="method-setException" class="cls expand">setException</a>(
<span class="pre">Mixed error</span>)
 : void</div><div class="description"><div class="short"><p>Marks the Operation as having experienced an exception. Can be supplied with an option error message/object.</p>
</div><div class="long"><p>Marks the Operation as having experienced an exception. Can be supplied with an option error message/object.</p>
<h3 class="pa">Parameters</h3><ul><li><span class="pre">error</span> : Mixed<div class="sub-desc"><p>Optional error string/object</p>
</div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-setStarted" class="member ni"><a href="Ext.data.Operation.html#method-setStarted" rel="method-setStarted" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-setStarted" class="viewSource">view source</a></div><a name="setStarted"></a><a name="method-setStarted"></a><a href="Ext.data.Operation.html#" rel="method-setStarted" class="cls expand">setStarted</a> : void</div><div class="description"><div class="short"><p>Marks the Operation as started</p>
</div><div class="long"><p>Marks the Operation as started</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-setSuccessful" class="member ni"><a href="Ext.data.Operation.html#method-setSuccessful" rel="method-setSuccessful" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-setSuccessful" class="viewSource">view source</a></div><a name="setSuccessful"></a><a name="method-setSuccessful"></a><a href="Ext.data.Operation.html#" rel="method-setSuccessful" class="cls expand">setSuccessful</a> : void</div><div class="description"><div class="short"><p>Marks the Operation as successful</p>
</div><div class="long"><p>Marks the Operation as successful</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
</li></ul></div></div></div><div id="method-wasSuccessful" class="member ni"><a href="Ext.data.Operation.html#method-wasSuccessful" rel="method-wasSuccessful" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Operation.html" class="definedIn docClass">Ext.data.Operation</a><br/><a href="../source/Operation.html#Ext-data.Operation-method-wasSuccessful" class="viewSource">view source</a></div><a name="wasSuccessful"></a><a name="method-wasSuccessful"></a><a href="Ext.data.Operation.html#" rel="method-wasSuccessful" class="cls expand">wasSuccessful</a> : Boolean</div><div class="description"><div class="short"><p>Returns true if the Operation has completed and was successful</p>
</div><div class="long"><p>Returns true if the Operation has completed and was successful</p>
<h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if successful</p>
</li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>